package cn.occgmat.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 这个类定义了返回的json格式，即json含有哪些字段
 * @author Administrator
 */
@Data
public class BaseResponse<T> {
    private Integer code;
    private String msg;
    private List<T> data;
    private Integer count;

    public BaseResponse(StatusCode statusCode) {
        this.code=statusCode.getCode();
        this.msg=statusCode.getMsg();
    }

}
